package br.com.nrti.still.dao;

public class Scripts {
	public static final String tabelaEventos = 
			"CREATE TABLE [Eventos] (" +
			"	[ID_EVENTO] INTEGER NOT NULL PRIMARY KEY ON CONFLICT ROLLBACK AUTOINCREMENT," +
			"	[DS_EVENTO] VARCHAR(50) NOT NULL," +
			"	[DT_EVENTO] DATETIME," +
			"	[DS_DIAS] VARCHAR(15), " +
			"	[HR_INICIO] TIME NOT NULL, " +
			"	[HR_FINAL] TIME NOT NULL,  " +
			"	[DM_ATIVO] BINARY NOT NULL DEFAULT 1, " +
			"	[DM_RESTAURAR] BINARY(1) NOT NULL DEFAULT 0, " +
			"	[DM_TOQUE] CHAR(3), " +
			"	[DM_AVIAO] CHAR(3), " +
			"	[DM_WIFI] CHAR(3), " +
			"	[DM_REDEMOVEL] CHAR(3), " +
			"	[DM_BLUETOOTH] CHAR(3), " +
			"	[DM_ALARME] CHAR(3), " +
			"	[DM_CALENDARIO] CHAR(3)," +
			"	[DM_TOQUE_FIM] CHAR(3), " +
			"	[DM_AVIAO_FIM] CHAR(3), " +
			"	[DM_WIFI_FIM] CHAR(3), " +
			"	[DM_REDEMOVEL_FIM] CHAR(3), " +
			"	[DM_BLUETOOTH_FIM] CHAR(3), " +
			"	[DM_ALARME_FIM] CHAR(3), " +
			"	[DM_CALENDARIO_FIM] CHAR(3));";
	
	public static final String tabelaLog = 
			"CREATE TABLE [Log] (" +
			"	[ID_LOG] INTEGER NOT NULL ON PRIMARY KEY ON CONFLICT ROLLBACK AUTOINCREMENT," +
			"	[ID_EVENTO] INTEGER NOT NULL CONSTRAINT [FK_EVENTO_LOG] REFERENCES [Eventos]([ID_EVENTO]) ON DELETE CASCADE ON UPDATE CASCADE," +
			"	[DT_LOG] DATE,[DS_DESCRICAO] VARCHAR(100));";
}
